import Person from './person' ;
class Teacher extends Person
{
    constructor(name,age,classT){
        super(name,age);
        this.classT = classT;
    }
    introduce(){
        let str;
        if(!this.classT)
            {
                str = super.introduce() + ` I am a Teacher. I teach No Class.`;
            }
        else
            {
                str = super.introduce() + ` I am a Teacher. I teach Class ${this.classT}.`;
            }
        return str;
    }
}
module.exports = Teacher;